import request from '@/utils/request'



// 排期列表
export function getList(params) {
    return request({
      url: `/client/live/schedule/list`,
      method: 'get',
      params
    })
}

// 查询负责人下拉框
export function responsibleSelect(params) {
    return request({
      url: '/common/v1/responsible/select',
      method: 'get',
      params
    })
}

// 排期列表详情
export function scheduleDetail(id) {
  return request({
    url: `/client/live/schedule/detail/${id}`,
    method: 'get'
  })
}

//查询直播人员下拉框
export function userSelect(params) {
    return request({
      url: `/common/v1/live/user/select`,
      method: 'get',
      params
    })
}

//查询关联服务工单下拉框
export function recordSelect(params) {
    return request({
      url: `/client/live/schedule/live/service/item/record/select`,
      method: 'get',
      params
    })
}

//编辑排期信息
export function editSchedulet(data) {
    return request({
      url: `/client/live/schedule`,
      method: 'put',
      data
    })
}

//查询新增服务项目下拉框
export function serviceItemSelect() {
    return request({
      url: `/client/live/schedule/live/service/item/select`,
      method: 'get',
    })
}

//获取服务客户下拉框
export function clientSelect() {
    return request({
      url: `/client/live/schedule/client/select`,
      method: 'get',
    })
}

//排期创建服务单
export function addService(data) {
    return request({
      url: `/client/live/schedule/service/item/record`, 
      method: 'post',
      data
    })
}

//排期日历展示
export function calendarList(data) {
    return request({
      url: `/client/live/schedule/calendar`,
      method: 'post',
      data
    })
}

//排期日历详情
export function calendarDetail(id) {
    return request({
      url: `/client/live/schedule/calendar/detail/${id}`,
      method: 'get'
    })
  }


  // 获取单个列表用户详情
export function workforceUserStatisticsDetail(params) {
    return request({
      url: '/client/live/schedule/workforce/user/statistics/detail',  
      method: 'get',
      params
    })
}


// 获取直播人员详情列表
export function workforceStatisticsDateList(params) {
    return request({
      url: '/client/live/schedule/workforce/statistics/date/list',
      method: 'get',
      params
    })
}


// 获取直播人员明细列表
export function workforceLiveDetailList(params) {
    return request({
      url: '/client/live/schedule/workforce/live/detail/list',
      method: 'get',
      params
    })
}

// 获取三天内门店直播计划
export function liveSchedulePlanLive() {
  return request({
    url: '/client/live/schedule/plan/live',
    method: 'get'
  })
}

// 获取排班统计信息
export function liveScheduleStatistics(params) {
  return request({
    url: '/client/live/schedule/statistics',
    method: 'get',
    params
  })
}

//获取未删除服务客户下拉框
export function clientSelectNotDel() {
  return request({
    url: `/client/live/schedule/client/select/not/del`,
    method: 'get',
  })
}
// 新增直播日历
export function addLiveCalendar(data) {
  return request({
    url: `/live/calendar`, 
    method: 'post',
    data
  })
}
// 修改直播日历
export function editLiveCalendar(data) {
  return request({
    url: `/live/calendar`, 
    method: 'put',
    data
  })
}
// 获取直播日历详情
export function liveCalendarId(id) {
  return request({
    url: `/live/calendar/${id}`,
    method: 'get',
  })
}
// 删除直播日历
export function delLiveCalendar(id) {
  return request({
    url: `/live/calendar/${id}`,
    method: 'delete',
  })
}
// 判断不同直播间同一时段或者、相交的时段内有重复主播或者中控
export function liveCalendarConfirmAdd(data) {
  return request({
    url: `/live/calendar/confirmAdd`, 
    method: 'post',
    data
  })
}
// 直播人员下拉框 角色类型 1 主播 2 中控
export function clientUserSelectList(params) {
  return request({
    url: `/live/calendar/user/select/list`,
    method: 'get',
    params
  })
}

// 直播间下拉框
export function clientRoomSelectList() {
  return request({
    url: `/live/calendar/room/select/list`,
    method: 'get',
  })
}

// 按月份日历统计数据
export function liveCalendarCount(params) {
  return request({
    url: `/live/calendar/count`,
    method: 'get',
    params
  })
}
// 日历数据
export function liveCalendarList(data) {
  return request({
    url: `/live/calendar/list`,
    method: 'post',
    data
  })
}
// 获取直播计划数据表
export function liveCalendarPlanList() {
  return request({
    url: `/live/calendar/plan/list`,
    method: 'get'
  })
}